package com.xiaohui.user.designPattern.template.prod;

import com.xiaohui.com.xiaohui.bean.Result;

public class AipTemplateDemo {
    public static void main(String[] args) {
        ApiTemplate apiTemplate = new ApiTemplate();
        Result result = new Result();
        Result ok = result.ok();
        apiTemplate.execute(ok, new Action() {
            @Override
            public void validate() {
                System.out.println("验证");
            }

            @Override
            public void execute() {
                System.out.println("执行");
            }

            @Override
            public void after() {
                System.out.println("执行后");
            }
        });
    }
}
